package com.intelligent.controller.feign;

import com.intelligent.entity.Department;
import com.intelligent.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.sql.DataSource;

@RestController
@RequestMapping("/feign/dept")
public class DepartmentController {
    @Autowired
    DepartmentService departmentService;
    @GetMapping("byId")
    public Department getById(Integer id){
        return departmentService.getById(id);
    }
}
